
keep if sample == 1
keep e_domain1 e_domain2 treatment strata wave phone_survey survey_date b_domain1 b_domain2 ent_id

compress

qui reg e_domain1 ib6.treatment i.strata i.wave phone_survey survey_date b_domain1, cluster(ent_id)
local d1_obs = e(N)

qui reg e_domain2 ib6.treatment i.strata i.wave phone_survey survey_date b_domain2, cluster(ent_id)
local d2_obs = e(N)

wyoung, cmd("reg e_domain1 ib6.treatment i.strata i.wave phone_survey survey_date b_domain1, cluster(ent_id)" "reg e_domain2 ib6.treatment i.strata i.wave phone_survey survey_date b_domain2, cluster(ent_id)" "reg e_domain1 ib6.treatment i.strata i.wave phone_survey survey_date b_domain1, cluster(ent_id)" "reg e_domain2 ib6.treatment i.strata i.wave phone_survey survey_date b_domain2, cluster(ent_id)") familyp(2.treatment 2.treatment 5.treatment 5.treatment) bootstraps(10000) seed(20) strata(strata wave) cluster(ent_id)

matrix A = r(table)
matrix B = (`d1_obs' \ `d2_obs' \ `d1_obs' \ `d2_obs')
matrix C = A[1...,1..2],A[1...,4],B
matrix colnames C = coef stderr pval obs

esttab matrix(C) using "$path/Output/Appendix_A/wyoung.tex", replace label
